package com.whtq.api.remote.config;

import feign.Feign;
import feign.Request;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * Created by
 *
 * @author wmi
 * @date 2021/9/15 - 15:55.
 * @description
 */
@Configuration
public class FeignConfig {
    Integer connectTimeoutMillis = 2000;


    Integer readTimeoutMillis = 2000;

    @Bean
    @Scope("prototype")
    public Feign.Builder feignBuilder() {
        return Feign.builder().options(new Request.Options(connectTimeoutMillis, readTimeoutMillis));
    }
}
